<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
	<title>事务设置</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
	<script language="javascript" src="<%= basePath %>assets/js/js.js"></script>
	<script type="text/javascript" src="<%= basePath %>assets/js/jquery-1.8.1.min.js"></script>
	<script type="text/javascript" src="<%= basePath %>assets/js/bui-min.js"></script>
	
	<script type="text/javascript" src="<%= basePath %>assets/js/config-min.js"></script>
	<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
	<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
	<script src="http://g.alicdn.com/bui/bui/1.1.21/config.js"></script>
	
	<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
	<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
	
	<script type="text/javascript">
		BUI.use('common/page');
	</script>
	
	<script type="text/javascript">
		BUI.use('bui/form', function(Form) {
			new Form.Form({
				srcNode : '#J_Form'
			}).render();
		});
	</script>
	
	<style type="text/css">
		body {
			padding: 30px;
		}
		
		.well {
			background:;
		}
	</style>
</head>
<body>
	<!-- 此节点内部的内容会在弹出框内显示,默认隐藏此节点-->
	<div id="content" class="well">
		<form id="form" action="<%= basePath %>transdetail/modifyTransDetail" class="form-horizontal">
			<!-- 事务明细id（隐藏域） -->
			<input type="hidden" name="transDetail.tdid" value="<s:property value="#transDetail.tdid"/>" />
		
			<table class="table table-bordered" style="margin-top: 30px;">
				<tr>
					<!-- 事务明细名称 -->
					<td align="right">事务明细</td>
					<td>
						<label>
							<input name="transDetail.tdname" class="input-normal control-text" 
								type="text" value="<s:property value="#transDetail.tdname"/>"/>
						</label>
					</td>
					
					<!-- 事务种类 -->
					<td align="right">事务种类</td>
					<td colspan="3">
						<select name="transDetail.ttypeid" size="1">
							<option value="-1"
								<s:if test="#transDetail.ttypeid == -1"> 
									selected="selected"
								</s:if>
							>
								请选择
							</option>
							
							<!-- 加载所有事务类型，原先选中的恢复选中 -->
							<s:iterator value="#transTypeList" var="transType">
								<option value='<s:property value="#transType.ttypeid"/>'
									<s:if test="#transDetail.ttypeid == #transType.ttypeid"> 
										selected="selected"
									</s:if>
								>
									<s:property value="#transType.ttname"/>
								</option>
							</s:iterator>
						</select>
					</td>
				</tr>

				<tr>
					<!-- 类型 -->
					<td align="right">类 型</td>
					<td>
						<select name="transDetail.tclass">
							<option value="2"
								<s:if test="#transDetail.tclass == 2"> 
									selected="selected"
								</s:if>
							>
								网点提交
							</option>
							
							<option value="3"
								<s:if test="#transDetail.tclass == 3"> 
									selected="selected"
								</s:if>
							>
								网管中心提交
							</option>
						</select>
					</td>
					
					<!-- 服务保障部门 -->
					<td align="right">服务保障部门</td>
					<td colspan="3">
						<select name="transDetail.ensuredeptid">
							<option value="-1"
								<s:if test="#transDetail.ensuredeptid == -1"> 
									selected="selected"
								</s:if>
							>
								请选择
							</option>
							
							<!-- 加载并回显部门信息 -->
							<s:iterator value="#deptList" var="dept">
								<option value="<s:property value="#dept.id"/>"
									<s:if test="#transDetail.ensuredeptid == #dept.id"> 
										selected="selected"
									</s:if>
								>
									<s:property value="#dept.name"/>
								</option>
							</s:iterator>
						</select>
					</td>
				</tr>
				<tr>
					<!-- 服务保障级别 -->
					<td align="right">服务保障级别</td>
					<td>
						<select name="transDetail.dlevel">
							<option value="0"
								<s:if test="#transDetail.dlevel == 0"> 
									selected="selected"
								</s:if>
							>
								无
							</option>
							<option value="1"
								<s:if test="#transDetail.dlevel == 1"> 
									selected="selected"
								</s:if>
							>
								一级
							</option>
							<option value="2"
								<s:if test="#transDetail.dlevel == 2"> 
									selected="selected"
								</s:if>
							>
								二级
							</option>
						</select>
					</td>
					
					<!-- 外包商 -->
					<td align="right">涉及外包服务商</td>
					<td>
						<input name="transDetail.expackage" type="text" 
							value="<s:property value="#transDetail.expackage" />"/>
					</td>
					
					<!-- 初审时限 -->
					<td align="right">初审时限</td>
					<td>
						<select name="transDetail.examtime">
							<option value="0"
								<s:if test="#transDetail.examtime == 0">
									selected="selected"
								</s:if>
							>
								无
							</option>
							
							<option value="1"
								<s:if test="#transDetail.examtime == 1">
									selected="selected"
								</s:if>
							>
								1工时
							</option>
							
							<option value="2"
								<s:if test="#transDetail.examtime == 2">
									selected="selected"
								</s:if>
							>
								2工时
							</option>
							
							<option value="3"
								<s:if test="#transDetail.examtime == 3">
									selected="selected"
								</s:if>
							>
								3工时
							</option>
							
							<option value="4"
								<s:if test="#transDetail.examtime == 4">
									selected="selected"
								</s:if>
							>
								4工时
							</option>
							
							<option value="5"
								<s:if test="#transDetail.examtime == 5">
									selected="selected"
								</s:if>
							>
								5工时
							</option>
							
							<option value="6"
								<s:if test="#transDetail.examtime == 6">
									selected="selected"
								</s:if>
							>
								6工时
							</option>
							
							<option value="24"
								<s:if test="#transDetail.examtime == 24">
									selected="selected"
								</s:if>	
							>
								1工作日
							</option>
							
							<option value="48"
								<s:if test="#transDetail.examtime == 48">
									selected="selected"
								</s:if>
							>
								2工作日
							</option>
							
							<option value="72"
								<s:if test="#transDetail.examtime == 72">
									selected="selected"
								</s:if>	
							>
								3工作日
							</option>
						</select>
					</td>
				</tr>
				<tr>
					<!-- 服务响应时限 -->
					<td align="right">服务响应时限</td>
					<td>
						<select name="transDetail.servicetime">
							<option value="0"
								<s:if test="#transDetail.servicetime == 0">
									selected="selected"
								</s:if>
							>
								无
							</option>
							
							<option value="1"
								<s:if test="#transDetail.servicetime == 1">
									selected="selected"
								</s:if>
							>
								1工时
							</option>
							
							<option value="2"
								<s:if test="#transDetail.servicetime == 2">
									selected="selected"
								</s:if>
							>
								2工时
							</option>
							
							<option value="3"
								<s:if test="#transDetail.servicetime == 3">
									selected="selected"
								</s:if>
							>
								3工时
							</option>
							
							<option value="4"
								<s:if test="#transDetail.servicetime == 4">
									selected="selected"
								</s:if>
							>
								4工时
							</option>
							
							<option value="5"
								<s:if test="#transDetail.servicetime == 5">
									selected="selected"
								</s:if>
							>
								5工时
							</option>
							
							<option value="6"
								<s:if test="#transDetail.servicetime == 6">
									selected="selected"
								</s:if>
							>
								6工时
							</option>
							
							<option value="24"
								<s:if test="#transDetail.servicetime == 24">
									selected="selected"
								</s:if>	
							>
								1工作日
							</option>
							
							<option value="48"
								<s:if test="#transDetail.servicetime == 48">
									selected="selected"
								</s:if>
							>
								2工作日
							</option>
							
							<option value="72"
								<s:if test="#transDetail.servicetime == 72">
									selected="selected"
								</s:if>	
							>
								3工作日
							</option>
						</select>
					</td>
					
					<!-- 抵达现场时限 -->
					<td align="right">抵达现场时限</td>
					<td>
						<select name="transDetail.scenetime">
							<option value="0"
								<s:if test="#transDetail.scenetime == 0">
									selected="selected"
								</s:if>
							>
								无
							</option>
							
							<option value="1"
								<s:if test="#transDetail.scenetime == 1">
									selected="selected"
								</s:if>
							>
								1工时
							</option>
							
							<option value="2"
								<s:if test="#transDetail.scenetime == 2">
									selected="selected"
								</s:if>
							>
								2工时
							</option>
							
							<option value="3"
								<s:if test="#transDetail.scenetime == 3">
									selected="selected"
								</s:if>
							>
								3工时
							</option>
							
							<option value="4"
								<s:if test="#transDetail.scenetime == 4">
									selected="selected"
								</s:if>
							>
								4工时
							</option>
							
							<option value="5"
								<s:if test="#transDetail.scenetime == 5">
									selected="selected"
								</s:if>
							>
								5工时
							</option>
							
							<option value="6"
								<s:if test="#transDetail.scenetime == 6">
									selected="selected"
								</s:if>
							>
								6工时
							</option>
							
							<option value="24"
								<s:if test="#transDetail.scenetime == 24">
									selected="selected"
								</s:if>	
							>
								1工作日
							</option>
							
							<option value="48"
								<s:if test="#transDetail.scenetime == 48">
									selected="selected"
								</s:if>
							>
								2工作日
							</option>
							
							<option value="72"
								<s:if test="#transDetail.scenetime == 72">
									selected="selected"
								</s:if>	
							>
								3工作日
							</option>
						</select>
					</td>
					
					<!-- 服务解决时限 -->
					<td align="right">服务解决时限</td>
					<td>
						<select name="transDetail.endtime">
							<option value="0"
								<s:if test="#transDetail.endtime == 0">
									selected="selected"
								</s:if>
							>
								无
							</option>
							
							<option value="1"
								<s:if test="#transDetail.endtime == 1">
									selected="selected"
								</s:if>
							>
								1工时
							</option>
							
							<option value="2"
								<s:if test="#transDetail.endtime == 2">
									selected="selected"
								</s:if>
							>
								2工时
							</option>
							
							<option value="3"
								<s:if test="#transDetail.endtime == 3">
									selected="selected"
								</s:if>
							>
								3工时
							</option>
							
							<option value="4"
								<s:if test="#transDetail.endtime == 4">
									selected="selected"
								</s:if>
							>
								4工时
							</option>
							
							<option value="5"
								<s:if test="#transDetail.endtime == 5">
									selected="selected"
								</s:if>
							>
								5工时
							</option>
							
							<option value="6"
								<s:if test="#transDetail.endtime == 6">
									selected="selected"
								</s:if>
							>
								6工时
							</option>
							
							<option value="24"
								<s:if test="#transDetail.endtime == 24">
									selected="selected"
								</s:if>	
							>
								1工作日
							</option>
							
							<option value="48"
								<s:if test="#transDetail.endtime == 48">
									selected="selected"
								</s:if>
							>
								2工作日
							</option>
							
							<option value="72"
								<s:if test="#transDetail.endtime == 72">
									selected="selected"
								</s:if>	
							>
								3工作日
							</option>
						</select>
					</td>
				</tr>
				<tr>
					<!-- 事务备注 -->
					<td align="right">事务备注</td>
					<td colspan="5">
						<textarea name="transDetail.note" cols="100"
							rows="4" style="width: 98%;">
							<s:property value="#transDetail.note"/>	
						</textarea>
					</td>
				</tr>

			</table>

			<!-- 提交按钮 -->
			<input type="submit" class="button button-info" value="提交"
				style="margin-left: 40%;">
		</form>
	</div>

	<!-- 删除script -->
	<script type="text/javascript">
		var href = "";
		BUI.use('bui/overlay', function(Overlay) {
			var dialog = new Overlay.Dialog({
				title : '确认框 ',
				width : 300,
				height : 200,
				bodyContent : '<p>是否确认删除  ？ </p>',
				success : function() {
					window.location.pathname = "/id=" + href;
				}
			});

			$('.delete').on('click', function() {
				href = this.value;
				console.log(href)
				dialog.show();
			});
		});
	</script>

</body>
</html>
